<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!-- JS Files ============================================ -->
<script src="/js/pronia/jquery-3.6.0.min.js"></script>
<script src="/js/pronia/bootstrap.bundle.min.js"></script>
<%--应用迁移辅助插件--%>
<script src="/js/pronia/jquery-migrate-3.3.2.min.js"></script>
<%--滚动条监听--%>
<script src="/js/pronia/jquery.waypoints.js"></script>
<%--滚动页面的时候展示 CSS 动画--%>
<script src="/js/pronia/wow.min.js"></script>
<%--移动设备触控滑块的js框架--%>
<script src="/js/pronia/swiper-bundle.min.js"></script>
<%--下拉选择菜单插件--%>
<script src="/js/pronia/jquery.nice-select.js"></script>
<%--视差引擎框架--%>
<script src="/js/pronia/parallax.min.js"></script>
<%--鼠标悬停提示工具--%>
<script src="/js/pronia/tippy.min.js"></script>
<%--浮点数范围滑块
<script src="/js/pronia/ion.rangeSlider.min.js"></script>--%>
<%--数字动画插件
<script src="/js/pronia/jquery.counterup.js"></script>--%>
<script src="/js/pronia/main.js"></script>

<script type="text/javascript" src="/js/layer.js"></script>
<script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/cart.js"></script>
<script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/aes.js"></script>
<script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/core-min.js"></script>
<script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/cipher-core-min.js"></script>
<script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/mode-ecb-min.js"></script>
<script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/encode/aes/pad-zeropadding-min.js"></script>
<script type="text/javascript" src="https://daily-project.oss-cn-guangzhou.aliyuncs.com/bookmall/js/validate.form.js"></script>
<script>
    function viewBook(bookId) {
        $.get('/bookmall/quickview/' + bookId, function (res) {

            $("#bookId").val(res.id)
            $("#coverImg").attr("src", res.cover);

            $("#bookName").html(res.name);
            $("#typeName").text(res.typeName);
            $("#author").text(res.author);
            $("#publisher").text(res.publisher);
            $("#isbn").text(res.isbn);
            $("#price").text("¥ " + res.price);
            $("#mark").text(res.mark);
        });
        // 显示模态框
        $('#quickModal').modal('show');
    }

    var clientWidth = document.documentElement.clientWidth;
    // 手机端移除"购物车详情"
    if (clientWidth < 767) {
        $("#cartDetail").attr("style", "display: none");
    }
    // 手机端移除"快速查看"模态框
    if (clientWidth < 575) {
        $(".quuickview-btn").attr("style", "display: none");
    }

    // 手机端移除"PC端默认分类页面显示效果"
    if (clientWidth < 575) {
        // 分类页面的查看模式按钮
        $("#grid-view-tab").attr("class", "");
        $("#grid-view-tab").attr("aria-selected", "false");

        $("#list-view-tab").attr("class", "active");
        $("#list-view-tab").attr("aria-selected", "true");

        // 分类主页面显示效果
        $("#grid-view").attr("class", "tab-pane fade");
        $("#list-view").attr("class", "tab-pane fade active show");
    }

</script>
